#include"string.h"
using namespace bit;
using std::cout;
using std::endl;

void test()
{
	string s("hello word");
	std::cout << s.c_str() << std::endl;
}
void test2()
{
	string s("hello bit");
	std::reverse(s.begin(),s.end());
	std::cout << s.c_str() << std::endl;
}
void test3()
{
	string s;
	cout << s.size() << ' ' << s.capacity() << endl;
	s.reserve(1000);
	cout << s.size() << ' ' << s.capacity() << endl;
}
void test4()
{
	string s("hello word");
	cout << s.c_str() << endl;
	s += 'c';
	s += 'c';
	s += "hello word";
	s.clear();
	cout << s.c_str() << endl;
	s += "hello";
	cout << s.c_str() << endl;
}

void test5()
{
	string s("hello word");
	//string s2(s);
	//cout << s2._str << endl;
	cout << s.size() << endl;
	cout << s.capacity()<< endl;
	s.clear();
	cout << s.size() << " " << s.capacity() << endl;
}
void test6()
{
	string s("hello word");
	string s2("hello bit");
	cout << s.c_str() << endl;
	cout << s2.c_str() << endl;
	s.swap(s2);
	cout << s.c_str() << endl;
	cout << s2.c_str() << endl;
	cout << 10;
}
void test7()
{
	string s("hello word");
	s.resize(100,'x');
	cout << s.capacity() << endl;
	cout << s[88];
}
void test8()
{
	string s1("hello word");
	string s2("hello wordddd");
	string s3("hello wo");
	string s4("hello word");
	string s5("hello wowd");
	cout << (s1 <= s2) <<endl;
	cout << (s1 <= s3) << endl;
	cout << (s1 <= s4) << endl;
	cout << (s1 <= s5) << endl;

}
void test9()
{
	string s1("hello word");
	string s2(s1);
	cout << (s1 > s2) << ' ' << (s1 >= s2) << ' ' << (s1 <= s2) << endl;
}
void test10()
{
	string s("hello word");
	cout << s.find('x') << endl;
	cout << s.find("rd") << endl;
}
void test11()
{
	string s("hello word");
	
	//s.insert(s.size(), "xxxx");
	s.insert(0,"xxxxx");
	cout << s.c_str() << endl;
	cout << s.size() << endl;

	s.erase(0);
	s.erase(0);
	s.erase(0);
	s.erase(0);
	s.erase(0);
	cout << s.size() << endl;

	s.erase(1);
	s.erase(2);
	cout << s.size() << endl;
	cout << s.c_str() << endl;
}

void test12()
{

	string s("hello word");
	cout << s.size() << ' ' << s.c_str() << endl;
	s.erase(5,2);
	cout << s.size() << ' ' << s.c_str() << endl;
}
void test13()
{
	string s(" ");
	cout << s << endl;
	/*int arr[10] = { 1,2,3,4,5,6,7,8,9,13 };
	for (auto ch : arr)
	{
		cout << ch;
	}*/
}

void test14()
{
	//string s("hello word");

	/*cin >> s;
	cout << s.size()<<" ";
	cout << s << endl;
	*/


	//char* sh=nullptr;
	//cin >> sh;
	cout << "hello word" << " " << endl;
}


void test15()
{
	cout << "hello wordd" << endl;

	string s;
	cin >> s;
	cout << "hello wordd" << endl;

	cout << s << endl;
}
int main()
{
	test15();
	return 0;
}
